#!/bin/bash
# $Id$


kmoddir="/medium/kernel-modules/lib/modules/$(uname -r)/"

if [ -d $kmoddir ]; then
	mkdir -p /lib/modules 
	rm -f /lib/modules/"$(uname -r)"
	ln -bs "$kmoddir" /lib/modules/"`uname -r`" || exit 1
elif [ ! -d /lib/modules/$(uname -r) ]; then
	echo " ERROR: Did not found a kernel modules directory on media $(cat /var/tmp/cdrom_device), exiting ..."
	exit 1
fi
